#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main() {
    int sec = 0;
    scanf("%d", &sec);
    printf("%d %d %d", sec / 60 / 60, sec / 60 % 60, sec % 60);
    return 0;
}